<!--
 Copyright 2020 Google LLC

 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
 You may obtain a copy of the License at

      http://www.apache.org/licenses/LICENSE-2.0

 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
-->

{{ define "order" }}

    {{ template "header" . }}

    <div {{ with $.platform_css }} class="{{.}}" {{ end }}>
        <span class="platform-flag">
            {{$.platform_name}}
        </span>
    </div>

    <main role="main" class="order">

        <section class="container order-complete-section">
            <div class="row">
                <div class="col-12 text-center">
                    <h3>
                        Your order is complete!
                    </h3>
                </div>
                <div class="col-12 text-center">
                    <p>We've sent you a confirmation email.</p>
                </div>
            </div>
            <div class="row border-bottom-solid padding-y-24">
                <div class="col-6 pl-md-0">
                    Confirmation #
                </div>
                <div class="col-6 pr-md-0 text-right">
                    {{.order.OrderId}}
                </div>
            </div>
            <div class="row border-bottom-solid padding-y-24">
                <div class="col-6 pl-md-0">
                    Tracking #
                </div>
                <div class="col-6 pr-md-0 text-right">
                    {{.order.ShippingTrackingId}}
                </div>
            </div>
            <div class="row padding-y-24">
                <div class="col-6 pl-md-0">
                    Total Paid
                </div>
                <div class="col-6 pr-md-0 text-right">
                    {{renderMoney .total_paid}}
                </div>
            </div>
            <div class="row">
                <div class="col-12 text-center">
                    <a class="cymbal-button-primary" href="/" role="button">
                        Continue Shopping
                    </a>
                </div>
            </div>
        </section>

        {{ if $.recommendations }}
            {{ template "recommendations" $.recommendations }}
        {{ end }}

    </main>

    {{ template "footer" . }}
    {{ end }}
